import request from '@/utils/request'
// 获取订单分页数据
export function orderList(data) {
  return request({
    url: '/order-manager/order/page',
    method: 'post',
    data
  })
}
// import { createAPI } from '@/utils/request'

// 获取订单分页数据/order-manager/order/page
// export const orderList = data => createAPI('/order-manager/order/page', 'post', data)
// 获取订单详情
export function orderDetail(id) {
  return request({
    url: `/order-manager/order/${id}`,
    method: 'get'

  })
}
// 获取城市的接口
export function orderCity(id) {
  return request({
    url: `/areas/children?parentId=${id}`,
    method: 'get'

  })
}
// 运单管理的接口
// 获取运单分页数据
export function waybillList(data) {
  return request({
    url: '/transport-order-manager/page',
    method: 'post',
    data
  })
}
// 统计运单
export function waybillStatic(data) {
  return request({
    url: '/transport-order-manager/count',
    method: 'get',
    data
  })
}
// 运单调度的查询
export function getDispatchConfig(data) {
  return request({
    url: '/dispatch-configuration-manager',
    method: 'get',
    data
  })
}
// 保存调度配置
export function setDispatchConfig(data) {
  return request({
    url: '/dispatch-configuration-manager',
    method: 'post',
    data
  })
}
// 获取地址信息
export function areaList(data) {
  return request({
    url: '/areas/children',
    method: 'get',
    data
  })
}
// 获取树状机构信息
export function agencyList(data) {
  return request({
    url: '/business-hall/tree',
    method: 'get',
    data
  })
}
// 获取运输任务分页数据
export function transportList(data) {
  return request({
    url: '/transport-task-manager/page',
    method: 'post',
    data
  })
}
// 获取运输任务详情
export function transportJobDetail(data) {
  return request({
    url: '/transport-task-manager/page',
    method: 'post',
    data
  })
}
// 工作台
export function dashboardData(data) {
  return request({
    url: '/workspace',
    method: 'get',
    data
  })
}
